Export Paper Model #38441
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
9 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#38441
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This add-on exports the active Mesh object as an SVG document ready to be printed and crafted into a real-world model.
For basic testing or simple models, it is enough to run the Export Paper Model operator and pick a file name. Multiple files will be created if more pages are necessary, since some vector editors (such as Inkscape) cannot handle multipage SVGs.
Models containing N-gon faces (N > 3) may produce a distorted net and models containing doubled vertices, edges or other such ugly phenomena may cause the script crash.
The layout of the net can be customized using Seams, representing the edges to be cut. A preview of the result can be obtained by running the Make Unfoldable operator and viewing the separated islands in the 3D View (controlled in the Toolbox) or in the UV editor, if that option is enabled during unfolding. The operator will soon be renamed to Unfold.
Further details and part of the algorithms used are described in the manual page on Blender wiki.
Current version (at the time of posting) of the script for Blender 2.69: io_export_paper_model.py
Current version of the script
A prerelease version for Blender 2.70, including tabbed interface.
The script uses tabs for indentation because I just like them. However, if that is a problem, I can of course convert to spaces.
I posted this addon as a patch two years ago, but that one is closed now as the script was not working properly back then.
Changed status to: 'Open'
Added subscriber: @emu-3
I forgot to mention the corresponding BA.org thread . I use it for announcements and people mostly use it for reporting bugs.
Added subscriber: @ideasman42
Added diff, to be able to comment on code.
I currently commit updates to the prerelease branch on github. I mostly cleaned up the code, and I should yet fix the Limit Island Size functionality.
Then, I will post the file as an attachment again.
I'm not in much of a hurry anymore since I was told the script can't get to the 2.70 release anyway.
Thanks for the 2d cross product :)
I also wont have much time to review or give feedback, its a good target to have this ready, after 2.70. typically its good to submit features well before release date.
I cleaned up the code and did a few other fixes. There are still many improvements to make, but I believe the code is ready for review.
The current version is here: io_export_paper_model.py. Eventual updates will be on github (the attachment corresponds to
e48f68ef
)@emu-3, had a quick look
Suggestions:
os.sep
rather than/
as path separator.__slots__
for all classes, avoids accidental attribute creation on typos and is more memory efficient.Looks like we should support mathutils.geometry.normal() for any number of vectors (not just 3-4), but that will have to wait until after release.
I was not aware of
__slots__
, thanks. I added it to all the classes for mesh data, not to the singletons and operators. It even made a performance boost of about 10% on my system :)Regarding
os.sep
it's a bit trickier because (I believe) the SVG file needs paths separated by forward slashes. Now I wrote that explicitly as a string replacement. I suppose the script was actually broken on Windows, but nobody told me :-/The updated file is in git and also here: io_export_paper_model.py.
Hello,
could somebody please check this script (the updated differential revision)? I made a lot of fixes and improvements, and I'd love to get it into a release.
EDIT: the github link seems to be broken. Try this one instead.
Added subscriber: @BrendonMurphy
Changed status from 'Open' to: 'Archived'
hi, closing this task, addon is now in contrib
for future patches/updates please create a new task.
for bug reports: https://developer.blender.org/maniphest/project/3/type/Bug/
Added subscriber: @SeaMonsterNY
I love this add-on! I use it extensively, however I often get a Traceback error that I just can't get around. I'm teaching kids modelling and we plan on making paper craft sculptures, the add-on however is not reliable enough for using in a school setting. I hope you can help me figure out what is wrong. Thank you!!
Report Error
Traceback (most recent call last):
File"// Applications/Blender/blender.app/Contents/Resources/2.7/scripts/addons_contrib/io_export_paper_model.py", line 1837, in invoke self.unfolder.prepare(cage_size, create_uvmap=self.do_create_uvmap, scale=sce.unit_settings.scale_length/self.scale)
File"// Applications/Blender/blender.app/Contents/Resources/2.7/scripts/addons_contrib/io_export_paper_model.py", line 160 in prepare self.mesh.generate_cuts(cage_size/scale if cage_size else None, priority_effect)
File"// Applications/Blender/blender.app/Contents/Resources/2.7/scripts/addons_contrib/io_export_paper_model.py", line 284, in generate_cuts if island_a.join(island_b, edge, size_limit=page_size):
File"// Applications/Blender/blender.app/Contents/Resources/2.7/scripts/addons_contrib/io_export_paper_model.py", line 1003, in join segments.sort(key=slope_from(position))
File"// Applications/Blender/blender.app/Contents/Resources/2.7/scripts/addons_contrib/io_export_paper_model.py", line 904, in slope return (vec.y/vec.length + 1) if ((vec.x,vec.y) > (0,0)) else (-1 -vec.y / vet.length)
ZeroDivisionError: float division by zero
location :-1
Added subscriber: @Blendify
@SeaMonsterNY please create a bug report here:
https://developer.blender.org/maniphest/task/create/?project=3&type=Bug
Added subscriber: @dr.sybren
Updated the addon to upstream revision 13d8334. That should solve this bug (and others).
@dr.sybren Thank you! I remember I had some issues with pushing to the
addons-contrib
repo, but I'll try again and add some more updates soon.Added subscriber: @nikitron
This comment was removed by @nikitron
Added subscriber: @MaxenceLeretdAubigny
Hey guys,
I'm using quite a lot that add-on for few months. There are 2 bugs that are pretty annoying and time consuming:
Abreviation. I can't figure out if I do something wrong or if the script has a problem on that side. It only take the first number in count when automatically generating the abbreviation. So If you have 17 or 34 or whatever have 2 numbers ou 3 It only shows 3 or 1... Wo you have to manually rename all the islands abbreviation... what about to fix that incredibly wrong problem (for an add-on that helps you to generate blueprints it's pretty big)
Unfold again. If you already unfold a model and ask a new unfold, the island names become a pretty huge mess. You have multiple time the same name etc. It should just rip of all the names and do it again from scratch.
Anyone have these problems too?
Removed subscriber: @Blendify
c960569
(upstream 1daeb8).Hey Adam,
Thank you for fixing it. I'm a bit new to the developper side. Where can I get the updated script? At the top of the page?
About the Unfold again, I understand the point but in my case it always mess my work up. As soon as I had new Seams on the mesh (i.e. if islands are to big for the paper size I chose) and click Unfold another time, it gives me like 10 islands with the same number etc.
It never did the right job of renaming all the island without duplicates.
The only option, to not have duplicates, is to remove all seams and let it create it by itself, but it's not what I want as I know what I'm doing :)
Maybe I do something wrong.. I really don't know
This comment was removed by @MaxenceLeretdAubigny
Maxence,
this task (38441) is closed and the links at the top of this page don't work anymore. You can download the file from [blender addons ]] repository or from [ https:*raw.githubusercontent.com/addam/Export-Paper-Model-from-Blender/master/io_export_paper_model.py | github , currently these are both the same.
Can you please check that the naming is wrong, even with this version?
And if it is, what is exactly your workflow?
Do you use Auto Label, or do you set the island names by hand?
(I assume that discussion causes no harm here and I assign this outdated task to myself.)
Added subscriber: @schneck007
I found a bug. my modell will not unfold in Blender. I have to triangulate it to work. In the untrigualated version I got " Error please report"
In pepakura it works all untrigulated find.
Christin, this task is closed. If you want to make a helpful bug report, please send it either to my e-mail or to BlenderArtists, and attach the model.
However, it doesn't even seem there is a bug. Some models cannot be exported without triangulation. The script could triangulate for you, of course, but that could damage your data -- that's why you have to call the Triangulate operator yourself.